﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Master/Admin.Master" AutoEventWireup="true"
    CodeBehind="UserBaseSet.aspx.cs" Inherits="Besture.UI.UserBaseSet" %>

<%@ Register Src="~/Admin/Control/UploadPhoto.ascx" TagPrefix="cms" TagName="UploadPhoto" %>
<%@ Register Src="~/Admin/Control/SelectCity.ascx" TagPrefix="cms" TagName="SelectCity" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<input id="hidUserTyle" runat="server" type="hidden" />
    <div class="mainbox">
        <div class="setTabCont">
        
            <div>
                <table width="98%" cellspacing="0" cellpadding="0" class="table_form">
               
                    <tr>
						<th>
							登录名：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtLoginName" Required="True" MaxLength="200" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr>
						<th>
							昵称：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtNickName" Required="True" MaxLength="200" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr style="display:none" >
						<th>
							登录密码：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtLoginPwd" Required="True" MaxLength="200" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr> 
					<tr>
						<th>
							手机号码：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtPhone" Required="True" MaxLength="50" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr>
						<th>
							Email：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtEmail" Required="True" MaxLength="100" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr>
						<th>
							真实姓名：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtRealName" Required="True" MaxLength="200" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr>
						<th>
							性别：
						</th>
						<td>
							<img src='/Admin/Themes/Images/dispensable.png' align='absMiddle' />
							<asp:DropDownList runat="server" ID="ddlSex">
							    <asp:ListItem Value="0">男</asp:ListItem>
                                <asp:ListItem Value="1">女</asp:ListItem>
							</asp:DropDownList>
						</td>
					</tr>
					<tr>
						<th>
							用户头像：
						</th>
						<td> 
                            <cms:UploadSinglePhoto runat="server" ID="UploadSinglePhoto" />
						</td>
					</tr>
					<tr>
						<th>
							生日：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtBirthday"  Required="True" ValidateExt="Date"></cms:TextBox>
						</td>
					</tr>
					<tr>
						<th>
							联系电话区号：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtAreaCode" Required="True" MaxLength="50" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr>
						<th>
							联系电话：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtTel" Required="True" MaxLength="50" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr id="trCompany" >
						<th>
							联系电话分机号：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtTelExt"  MaxLength="50" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
                  	<tr>
						<th>
							用户可用积分：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtUserPoints"  MaxLength="10" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr> 
					<tr>
						<th>
							所属城市：
						</th>
						<td>  
                            <cms:SelectCity runat="server" id="SelectCity" />
						</td>
					</tr> 
					<tr>
						<th>
							企业名称：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtCompanyName"  MaxLength="200"  WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr>
						<th>
							法定代表人：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtRepresentative"  MaxLength="100" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr>
						<th>
							详细地址：
						</th>
						<td>
							<cms:TextBox runat="server" ID="txtAddress"  MaxLength="500" 
								WidthExt="Width_400" ></cms:TextBox>
						</td>
					</tr>
					<tr>
						<th>
							用户等级：
						</th>
						<td>
						     <asp:DropDownList ID="ddlUserRating" runat="server">
						         <asp:ListItem Value="1">1级</asp:ListItem>
                                 <asp:ListItem Value="2">2级</asp:ListItem>
                                 <asp:ListItem Value="3">3级</asp:ListItem>
                                 <asp:ListItem Value="4">4级</asp:ListItem>
                                 <asp:ListItem Value="5">5级</asp:ListItem>
						     </asp:DropDownList>
						</td>
					</tr>
					<tr>
						<th>
							等级积分：
						</th>
						<td>
                            <asp:DropDownList ID="ddlRatingIntegration" runat="server">
						         <asp:ListItem Value="1">1级</asp:ListItem>
                                 <asp:ListItem Value="2">2级</asp:ListItem>
                                 <asp:ListItem Value="3">3级</asp:ListItem>
                                 <asp:ListItem Value="4">4级</asp:ListItem>
                                 <asp:ListItem Value="5">5级</asp:ListItem>
						     </asp:DropDownList>
						</td>
					</tr> 
				    <div style="display:none" ><cms:Sort runat="server" ID="txtSortID" Table="TBUserBase" /></div>   	 
                </table>
            </div>
        </div>
        <div class="buttonDiv">
            <asp:Button runat="server" ID="btnSubmit" CssClass="button" Text="保存" OnClick="BtnSubmitClick" />
            <input type="button" class="button" value="取消" onclick="location.href='<%=ListUrl() %>'" />
        </div>
    </div>
    <script>
        
        $(function() {

            var vUserTyle = $("#<%=hidUserTyle.ClientID%>").val();
            if (parseInt(vUserTyle) == 2) {
                //企业校验
                $("#trCompany").nextAll().find("td img").remove();
                $("#trCompany").nextAll().find("td input").before(" <img src='/Admin/Themes/Images/indispensable.gif' align='absMiddle'>");

                $("#trCompany").nextAll().find("td select").before(" <img src='/Admin/Themes/Images/dispensable.png' align='absMiddle'>");
                
               
                $("#trCompany").nextAll().find("td input").addClass("required");
            } else {
                //隐藏企业字段
                $("#trCompany").nextAll().css("display","none");
            }

        });
    </script>
</asp:Content>
